package com.etc.service.impl;

import com.etc.dao.EmpMapper;
import com.etc.entity.EMP;
import com.etc.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper mapper;

    @Override
    public int deleteByPrimaryKey(Short empno) {
        return mapper.deleteByPrimaryKey(empno);
    }

    @Override
    public int insert(EMP record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(EMP record) {
        return mapper.insertSelective(record);
    }

    @Override
    public EMP selectByPrimaryKey(Short empno) {
        return mapper.selectByPrimaryKey(empno);
    }

    @Override
    public int updateByPrimaryKeySelective(EMP record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(EMP record) {
        return mapper.updateByPrimaryKey(record);
    }

    @Override
    public List<EMP> selectByPage(String keywords) {
        return mapper.selectByPage(keywords);
    }
}
